package com.qimencloud.api;

import com.qimencloud.api.scenehu3cgwt0tc.request.WdtTradeQueryRequest;
import com.qimencloud.api.scenehu3cgwt0tc.response.WdtTradeQueryResponse;
import com.taobao.api.ApiException;

public class TradeQueryTest {
	private static String serverUrl = "https://hu3cgwt0tc.api.taobao.com/router/qmtest";
	private static String appKey = "";//自己申请的奇门appkey
	private static String appSecret = "";//自己申请的奇门appkey对应的secret
	private static String format = "json"; 
	public static void main(String[] args) {

		DefaultQimenCloudClient client = new DefaultQimenCloudClient(serverUrl, appKey, appSecret, format);
		WdtTradeQueryRequest req = new WdtTradeQueryRequest();
		req.setTargetAppKey("");//旺店通的奇门appkey
        req.setSid("");//旺店通erp的卖家账号
		req.setStartTime("2019-09-25 10:00:00");
		req.setEndTime("2019-09-25 11:00:00");
		req.setPageSize(40L);
		req.setPageNo(0L);
		//req.setStatus(30L);
		
		try {
			WdtTradeQueryResponse res = client.execute(req);
			System.out.println("code:"+ res.getCode());
			System.out.println("message:"+res.getMessage());
			System.out.println("body:"+res.getBody());
			
		} catch (ApiException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
